#!/bin/bash
# 启动独立的代码审计服务
# 端口: 8003

cd "$(dirname "$0")/.."

echo "======================================"
echo "启动代码审计服务"
echo "端口: 8043"
echo "====================================="

# 检查是否设置了模型路径环境变量
if [ -z "$AUDIT_MODEL_PATH" ]; then
    export AUDIT_MODEL_PATH="/data/vlm/mzh/finetune-merge-deepseek-8b"
    echo "使用默认模型路径: $AUDIT_MODEL_PATH"
else
    echo "使用环境变量模型路径: $AUDIT_MODEL_PATH"
fi

# 启动服务
cd backend
uvicorn audit_service:app --reload --host 0.0.0.0 --port 8043
